<?php
include_once("../Library/class.phphome.php");
	$x = new APIcore;
	Layout::setOption("root", "../Themes/".$x->settings->theme."");
		$layout = new Layout("form-2cols");
				$layout->_cms_content = new Layout("view/admin/layout");
				$layout->charset = $x->settings->charset;
				$layout->theme = $x->settings->theme;
				$layout->siteurl = $x->settings->siteurl;
				$layout->sitename = $x->settings->sitename;
				$layout->sitetitle = $x->settings->sitetitle;
			
	$layout->Display();



			if(isset($_POST['design_body_background'])){
				
				$db = new DB(DBPREFIX."css_definitions");
				
				$db->design_body_background = $_POST['design_body_background'];
				$db->body_bgimage = $_POST['body_bgimage'];
				$db->body_bgimage_repeat = $_POST['body_bgimage_repeat'];
				
				$db->design_header_background = $_POST['design_header_background'];
				$db->header_bgimage = $_POST['header_bgimage'];
				$db->header_bgimage_repeat = $_POST['header_bgimage_repeat'];
				
				$db->design_footer_background = $_POST['design_footer_background'];
				$db->footer_bgimage = $_POST['footer_bgimage'];
				$db->footer_bgimage_repeat = $_POST['footer_bgimage_repeat'];
				
				$db->design_content_background = $_POST['design_content_background'];
				
				$db->design_sidebar_background = $_POST['design_sidebar_background'];
				$db->sidebar_bgimage = $_POST['sidebar_bgimage'];
				$db->sidebar_bgimage_repeat = $_POST['sidebar_bgimage_repeat'];
				
				
				$db->update();
				$x->redirect("");
			}


?>